Optimal. Leaf size=140 \[ -\frac {(1-i) \sqrt {a} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {2 i \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{3 d}-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4326, 3642,
3679, 12, 3625, 211} \begin {gather*} -\frac {2 \cot ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}-\frac {2 i \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{3 d}-\frac {(1-i) \sqrt {a} \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 3625
Rule 3642
Rule 3679
Rule 4326
Rubi steps
\begin {align*} \int \cot ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx &=\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\tan ^{\frac {5}{2}}(c+d x)} \, dx\\ &=-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}+\frac {\left (2 \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\left (\frac {i a}{2}-a \tan (c+d x)\right ) \sqrt {a+i a \tan (c+d x)}}{\tan ^{\frac {3}{2}}(c+d x)} \, dx}{3 a}\\ &=-\frac {2 i \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{3 d}-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}+\frac {\left (4 \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int -\frac {3 a^2 \sqrt {a+i a \tan (c+d x)}}{4 \sqrt {\tan (c+d x)}} \, dx}{3 a^2}\\ &=-\frac {2 i \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{3 d}-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}-\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {2 i \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{3 d}-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}+\frac {\left (2 i a^2 \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=-\frac {(1-i) \sqrt {a} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {2 i \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{3 d}-\frac {2 \cot ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.06, size = 125, normalized size = 0.89 \begin {gather*} -\frac {i e^{-i (c+d x)} \left (4 e^{3 i (c+d x)}-3 \left (-1+e^{2 i (c+d x)}\right )^{3/2} \tanh ^{-1}\left (\frac {e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )\right ) \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{3 d \left (-1+e^{2 i (c+d x)}\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1040 vs. \(2 (112 ) = 224\).
time = 43.42, size = 1041, normalized size = 7.44
method | result | size |
default | \(\text {Expression too large to display}\) | \(1041\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 961 vs. \(2 (104) = 208\).
time = 0.59, size = 961, normalized size = 6.86 \begin {gather*} \frac {2 \, \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left ({\left (-\left (3 i - 3\right ) \, \cos \left (3 \, d x + 3 \, c\right ) - \left (i - 1\right ) \, \cos \left (d x + c\right ) + \left (3 i + 3\right ) \, \sin \left (3 \, d x + 3 \, c\right ) + \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (\frac {3}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + {\left (-\left (3 i + 3\right ) \, \cos \left (3 \, d x + 3 \, c\right ) - \left (i + 1\right ) \, \cos \left (d x + c\right ) - \left (3 i - 3\right ) \, \sin \left (3 \, d x + 3 \, c\right ) - \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (\frac {3}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )\right )} \sqrt {a} + 3 \, {\left (2 \, {\left (-\left (i + 1\right ) \, \cos \left (2 \, d x + 2 \, c\right )^{2} - \left (i + 1\right ) \, \sin \left (2 \, d x + 2 \, c\right )^{2} + \left (2 i + 2\right ) \, \cos \left (2 \, d x + 2 \, c\right ) - i - 1\right )} \arctan \left (2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + 2 \, \sin \left (d x + c\right ), 2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + 2 \, \cos \left (d x + c\right )\right ) + {\left (\left (i - 1\right ) \, \cos \left (2 \, d x + 2 \, c\right )^{2} + \left (i - 1\right ) \, \sin \left (2 \, d x + 2 \, c\right )^{2} - \left (2 i - 2\right ) \, \cos \left (2 \, d x + 2 \, c\right ) + i - 1\right )} \log \left (4 \, \cos \left (d x + c\right )^{2} + 4 \, \sin \left (d x + c\right )^{2} + 4 \, \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )^{2}\right )} + 8 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} {\left (\cos \left (d x + c\right ) \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + \sin \left (d x + c\right ) \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )\right )}\right )\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sqrt {a} + 2 \, {\left ({\left ({\left (-\left (i - 1\right ) \, \cos \left (d x + c\right ) + \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} + {\left (-\left (i - 1\right ) \, \cos \left (d x + c\right ) + \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, {\left (\left (i - 1\right ) \, \cos \left (d x + c\right ) - \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right ) - \left (i - 1\right ) \, \cos \left (d x + c\right ) + \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + {\left ({\left (-\left (i + 1\right ) \, \cos \left (d x + c\right ) - \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} + {\left (-\left (i + 1\right ) \, \cos \left (d x + c\right ) - \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, {\left (\left (i + 1\right ) \, \cos \left (d x + c\right ) + \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right ) - \left (i + 1\right ) \, \cos \left (d x + c\right ) - \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )\right )} \sqrt {a}}{6 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {5}{4}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 326 vs. \(2 (104) = 208\).
time = 0.98, size = 326, normalized size = 2.33 \begin {gather*} \frac {-16 i \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} e^{\left (3 i \, d x + 3 i \, c\right )} - 3 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {-\frac {8 i \, a}{d^{2}}} \log \left ({\left (\sqrt {2} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {-\frac {8 i \, a}{d^{2}}} + 4 i \, a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 3 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {-\frac {8 i \, a}{d^{2}}} \log \left ({\left (\sqrt {2} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {-\frac {8 i \, a}{d^{2}}} + 4 i \, a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right )}{12 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {cot}\left (c+d\,x\right )}^{5/2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________